package com.tchy.cloud.entity;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * xmweilove
 * 课程订单
 */
@Entity
@Table(name = "a_course_order", schema = "", catalog = "")
public class ACourseOrderEntity {
    private Long id;//主键,课程订单id course_order_id
    private String orderSn;//订单号  order_sn

    //    private Long course_id;//课程id course_id
    private ACourseEntity courseEntity;

    //    private Long customerId;//用户id  customer_id
    private ACustomerEntity customerEntity;

    private AConsultantEntity consultantEntity;//咨询师id consultant_id

    private Float orderPrice;//订单价格  order_price
    private Float payPrice;//支付价格  pay_price
    private Integer payType;//支付方式  pay_type
    private Integer payStatus;//支付状态  pay_status
    private String payTime;//支付时间  pay_time
    private String orderTime;//下单时间   order_time

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "course_order_id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "order_sn")
    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "course_id")
    public ACourseEntity getCourseEntity() {
        return courseEntity;
    }

    public void setCourseEntity(ACourseEntity courseEntity) {
        this.courseEntity = courseEntity;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "customer_id")
    public ACustomerEntity getCustomerEntity() {
        return customerEntity;
    }

    public void setCustomerEntity(ACustomerEntity customerEntity) {
        this.customerEntity = customerEntity;
    }

    @Basic
    @Column(name = "order_price")
    public Float getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(Float orderPrice) {
        this.orderPrice = orderPrice;
    }

    @Basic
    @Column(name = "pay_price")
    public Float getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(Float payPrice) {
        this.payPrice = payPrice;
    }

    @Basic
    @Column(name = "pay_type")
    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    @Basic
    @Column(name = "pay_status")
    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    @Basic
    @Column(name = "pay_time")
    public String getPayTime() {
        return payTime;
    }

    public void setPayTime(String payTime) {
        this.payTime = payTime;
    }

    @Basic
    @Column(name = "order_time")
    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "consultant_id")
    public AConsultantEntity getConsultantEntity() {
        return consultantEntity;
    }

    public void setConsultantEntity(AConsultantEntity consultantEntity) {
        this.consultantEntity = consultantEntity;
    }
}
